<script setup>
import { ref } from "vue";
import api from "./api"
const msg = ref("")
function getPing(){
  api.getPing().then(res => {
    console.log(res.data.msg);
    msg.value = res.data.msg
  })
}
import {stt} from "./store/store"
</script>


<template >
  <p>{{ $store.state.count }}</p>
  <p>{{ $store.state.name }}</p>
  <p>{{ stt.count }}</p>
  <p>{{ stt.name }}</p>
  <!-- <p>{{ $store.msg.name }}</p> -->
  <a>
  <RouterLink to="/">首页</RouterLink>|
  <RouterLink to="/about">关于</RouterLink>|
  <RouterLink to="/news">新闻</RouterLink>
  </a>
  <!-- 子组件会渲染到这里 -->
  <RouterView></RouterView>
</template>